$(function () {
    // 退出按钮
    $('#exit').on('click', function () {
        swal({
            title: "确定退出系统",
            // text: "确定退出系统？",
            type: "warning",
            showCancelButton: true,
            confirmButtonText:"确定",
            closeOnConfirm: false,
            confirmButtonColor: "#23ad44",
            cancelButtonText:"取消",
        },function (button) {
            if(button) {
                sessionStorage.clear();
                location = 'login.html';
            }
        });
    });
    
    // 鼠标移出UL 隐藏UL
    $(function () {
        $('#J_iframe').on('mouseover', function () {
            if ($("#userli").hasClass("open")) {
                $("#userli").removeClass("open");
                $("#user").removeAttr("aria-expanded");
            }
        })
    });
	
    $(".newNotification-icon").parent().click(function(){
        if(!$(".newNotification-icon").is(".hidden")) {
            $(".newNotification-icon").addClass("hidden");
        }
    });
	
	$("#navbar-username").html($.trim(Account.user.name).entity());
	//$("#navbar-account").html(Account.info.account);
	//$("#navbar-registrationTime").html(new Date(Account.info.gmtCreate).Format("yyyy-MM-dd hh:mm:ss"));
});